<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>编辑薪酬结算</title>


<link href="${base}/resources/admin/css/amazeui.css" rel="stylesheet" type="text/css" /><link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resources/admin/editor/kindeditor.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/input.js"></script>
<script type="text/javascript">
$().ready(function() {

	var $inputForm = $("#inputForm");
	var $browserButton = $("#browserButton");
	
	[@flash_message /]
	
	$browserButton.browser();
	
	// 表单验证
	$inputForm.validate({
		rules: {
		}
	});

    $('#done').click(function(){
        if (confirm("确定汇款成功吗？")) {
            $('#status').val('done');
            $inputForm.submit();
        }

    });

    $('#reject').click(function(){

        var reason = prompt("请输入拒绝原因","");
        if (reason != null){
            $('#rejectReason').val(reason);
            $('#status').val('reject');
            $inputForm.submit();
        }
    });

});
</script>
</head>
<body>
	<div class="path">
		<a href="${base}/asl-admin/common/index.htm">${message("admin.path.index")}</a> &raquo; 编辑薪酬结算
	</div>
	<form id="inputForm" action="update.htm" method="post">
		<input type="hidden" name="id" value="${withdrawal.id}" />
        <input type="hidden" name="status" id="status" value="" />、
        <input type="hidden" name="rejectReason" id="rejectReason" value="" />
		<table class="input">
			<tr>
				<th>
					商家:
				</th>
				<td>
					${withdrawal.merchant.username}
				</td>
			</tr>
            <tr>
                <th>
                    薪酬结算:
                </th>
                <td>
				${withdrawal.point}
                </td>
            </tr>
            <tr>
                <th>
                    银行卡卡号:
                </th>
                <td>
				${withdrawal.bankCardNo}
                </td>
            </tr>
            <tr>
                <th>
                    持卡人:
                </th>
                <td>
				${withdrawal.bankCardName}
                </td>
            </tr>
            <tr>
                <th>
                    开户行:
                </th>
                <td>
				${withdrawal.bankCardSubBranch}
                </td>
            </tr>
            <tr>
                <th>
                    状态:
                </th>
                <td>
				[#if withdrawal.status == "reviewing"]
                    <span class="green">${withdrawal.status.toValue()}</span>
				[#elseif withdrawal.status == "done"]
                    <span class="blue">${withdrawal.status.toValue()}</span>
				[#else]
                    <span class="red">${withdrawal.status.toValue()}</span>
				[/#if]
                </td>
            </tr>
            <tr>
                <th>
                    拒绝原因:
                </th>
                <td>
                [#if withdrawal.status == "reject"]
                    ${withdrawal.rejectReason}
                [/#if]
                </td>
            </tr>
			<tr>
				<th>
					&nbsp;
				</th>
				<td>
				[#if withdrawal.status == "reviewing"]
                    <input type="button" id="done" class="button" value="已汇款" />
                    <input type="button" id="reject" class="button" value="拒绝" />
				[/#if]
					<input type="button" class="button" value="${message("admin.common.back")}" onclick="location.href='list.htm'" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
